package cn.kgc.novel.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

//杨将
//小说名作者等
public class Books {

  private int bid;  //书籍表的id主键
  private String bookname; //书名
  private int authorid; //作者id
  private String intro; //简介
  private String popularity;  //人气
  private int typeid; //类型id
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date createtime; //创作时间
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date renewaltime; //更新时间
  private String status;  //状态
  private int booknum;  //字数
  private String avatar; //数据图片


  private Type type;

  private Users users;

  private String title;   //章节
  private int titleid;//章节

  public String getTitle() {
    return title;
  }

  public void setTitle(String title) {
    this.title = title;
  }

  public int getTitleid() {
    return titleid;
  }

  public void setTitleid(int titleid) {
    this.titleid = titleid;
  }

  public Users getUsers() {
    return users;
  }

  public void setUsers(Users users) {
    this.users = users;
  }

  @Override
  public String toString() {
    return "Books{" +
            "bid=" + bid +
            ", bookname='" + bookname + '\'' +
            ", authorid=" + authorid +
            ", intro='" + intro + '\'' +
            ", popularity='" + popularity + '\'' +
            ", typeid=" + typeid +
            ", createtime='" + createtime + '\'' +
            ", renewaltime='" + renewaltime + '\'' +
            ", status='" + status + '\'' +
            ", booknum=" + booknum +
            ", avatar='" + avatar + '\'' +
            ", type=" + type +
            ", users=" + users +
            ", title='" + title + '\'' +
            ", titleid=" + titleid +
            '}';
  }

  public Type getType() {
    return type;
  }

  public void setType(Type type) {
    this.type = type;
  }

  public int getBid() {
    return bid;
  }

  public void setBid(int bid) {
    this.bid = bid;
  }

  public String getBookname() {
    return bookname;
  }

  public void setBookname(String bookname) {
    this.bookname = bookname;
  }

  public int getAuthorid() {
    return authorid;
  }

  public void setAuthorid(int authorid) {
    this.authorid = authorid;
  }

  public String getIntro() {
    return intro;
  }

  public void setIntro(String intro) {
    this.intro = intro;
  }

  public String getPopularity() {
    return popularity;
  }

  public void setPopularity(String popularity) {
    this.popularity = popularity;
  }

  public int getTypeid() {
    return typeid;
  }

  public void setTypeid(int typeid) {
    this.typeid = typeid;
  }

  public Date getCreatetime() {
    return createtime;
  }

  public void setCreatetime(Date createtime) {
    this.createtime = createtime;
  }

  public Date getRenewaltime() {
    return renewaltime;
  }

  public void setRenewaltime(Date renewaltime) {
    this.renewaltime = renewaltime;
  }

  public String getStatus() {
    return status;
  }

  public void setStatus(String status) {
    this.status = status;
  }

  public int getBooknum() {
    return booknum;
  }

  public void setBooknum(int booknum) {
    this.booknum = booknum;
  }

  public String getAvatar() {
    return avatar;
  }

  public void setAvatar(String avatar) {
    this.avatar = avatar;
  }

}
